#include<iostream>
#include<cstring>
#include<algorithm>
#include<cmath>
int dis[1010];
int vis[1010];
int map[1010][1010];
int n;
void Dij(int x)
{
	memset(dis, 0x3f, sizeof(dis));
	memset(vis, 0, sizeof(vis));
	dis[x] = 0;
	for (int i = 0; i < n; i++) {
		int pos = -1;
		for (int j = 1; j <= n; j++) {
			if (!vis[i] && (pos == -1 || dis[j] < dis[pos])) {
				pos = j;
				break;
			}
		}
		vis[pos] = 1;
		for (int j = 1; j <= n; j++) {
			//dis[j] = min(dis[j], map[pos][i] + dis[pos]);
			int a = min(1, 2);
		}
	}
	if()
	/*for (int i = 0; i < n; i++) {
		int pos = -1;
		int mi = 0x3f3f3f3f;
		for(int i=0;)
		for (int i = 0; i < n; i++) {
			if (!vis[i] && dis[i] > mi) {
				mi = dis[i];
				pos = i;
			}
		}
	}*/
}